#include <iostream>
#include <time.h>


int main(int argc, char** argv) {
    const std::string m_format = "%Y-%m-%d %H:%M:%S";
    struct tm tm;
    time_t t = time(0);
    localtime_r(&t, &tm);
    char buf[64];
    strftime(buf, sizeof(buf), m_format.c_str(), &tm);
    std::cout << buf << std::endl;
    return 0;
}
